<extend name="Public/base" />
<block name="body">
    <div class="right_col" role="main">
 <div class="page-title">
                <div class="title_left">
                    <h3>{$meta_title} <small>Some examples to get you started</small></h3>
                </div>

                <div class="title_right">
                    <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="Search for...">
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="button">Go!</button>
                            </span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="clearfix"></div>
           




            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
          <div class="x_title">
                        <h2>创建菜单 <small>Create menu</small></h2>

                        <ul class="nav navbar-right panel_toolbox">
                            <li class="">
                                <a href="{:U('ArticleCategory/add')}"><button type="button" class="btn btn-success"><i class="fa fa-edit"></i>&nbsp;添加</button></a>
                            </li> 
                        </ul>
                        <div class="clearfix"></div>
                    </div>
          <!-- Left Sidebar Start -->
       
   <div class="x_content">

            <!-- Row Start -->
            <div class="row-fluid">
  <div class="category">
      <dl class="cate-item" style="background-color: #353535;color: #fff">
		<dt class="cf">
			<form action="/admin.php/article_categroy/edit.html" method="post">
				<div class="btn-toolbar opt-btn cf">
		
					
				</div>
				<div class="fold">折叠</div>
				<div class="order">排序</div>
				<div class="order">发布</div>
				<div class="name">
				名称
				</div>
			</form>
		</dt>
			</dl>
      
		{:R('ArticleCategory/tree', array($tree))}
	</div>
                
            </div>
   </div>
                </div></div>
        
            <!-- Row End -->           

       
   
          <!-- Right Sidebar End -->


    


    </div>

    
</block>
<block name="script">
<link href="__MSTATIC__/css/2016_08_04.css" rel="stylesheet">
  <script type="text/javascript">
		(function($){
			/* 分类展开收起 */
			$(".category dd").prev().find(".fold i").addClass("icon-unfold")
				.click(function(){
					var self = $(this);
					if(self.hasClass("icon-unfold")){
						self.closest("dt").next().slideUp("fast", function(){
							self.removeClass("icon-unfold").addClass("icon-fold");
						});
					} else {
						self.closest("dt").next().slideDown("fast", function(){
							self.removeClass("icon-fold").addClass("icon-unfold");
						});
					}
				});

			/* 三级分类删除新增按钮 */
			$(".category dd dd .add-sub").remove();

			/* 实时更新分类信息 */
			$(".category")
				.on("submit", "form", function(){
					var self = $(this);
					$.post(
						self.attr("action"),
						self.serialize(),
						function(data){
							/* 提示信息 */
							var name = data.status ? "success" : "error", msg;
							msg = self.find(".msg").addClass(name).text(data.info)
									  .css("display", "inline-block");
							setTimeout(function(){
								msg.fadeOut(function(){
									msg.text("").removeClass(name);
								});
							}, 1000);
						},
						"json"
					);
					return false;
				})
                .on("focus","input",function(){
                    $(this).data('param',$(this).closest("form").serialize());

                })
                .on("blur", "input", function(){
                    if($(this).data('param')!=$(this).closest("form").serialize()){
                        $(this).closest("form").submit();
                    }
                });
		})(jQuery);
    Lzy.highlight_subnav("{:U('ArticleCategory/index')}");
  </script>    
</block>